﻿using MediatR;
using RBAC.LuFang.API.Application.Command.UserCommand;
using RBAC.LuFang.Domain;
using RBAC.LuFang.Domin.Services;

namespace RBAC.LuFang.API.Application.CommandHandlers.UserHandler
{
    //用户反填
    public class UserFanCommandHandler:IRequestHandler<UserFanCommand, UserInfo>
    {
        private readonly IUserService _userService;

        public UserFanCommandHandler(IUserService userService)
        {
            _userService = userService;
        }

        public async Task<UserInfo> Handle(UserFanCommand request, CancellationToken cancellationToken)
        {
            return await _userService.GetByid(request.id);
        }
    }
}
